<div id="replace">
 	 @foreach($res as $val)
		<div class="panel panel-default">
   
  			<div class="panel-body">

	  			<span id="titleW">{!! $val->title !!}</span>
	    		<a class="btn btn-info" id="read{{$val->id}}" >阅读</a>
	   			<a href="new/{{$val->id}}/edit" class="btn btn-info">修改</a>
		
	      		<form action="new/{{$val->id}}" method="post" style="display: inline-block;">
	          		  {{csrf_field()}}
	           		 {{method_field('DELETE')}}
	            	<button type="submit" class="btn btn-danger" >删除</button>
	        	</form>
    		</div>
    		
    	</div>
    	<script type='text/javascript' src="/js/jquery-1.8.2.min.js"></script>
    	<script>
    	//显示显示页面
			$("#read{{$val->id}}").click(function(){
					$('#addHtml').css('display','none');
					//ajax设置
					$.get("new/{{$val->id}}",{},function(data){				
 						$('#showWeb').html(data);
 						$('#backIndex').css('display','block');
					}) 
				}); 

			//返回主页面
			 $("#backIndex").click(function(){
					$('#showWeb').empty();
					$('#backIndex').css('display','none');
					$('#addHtml').css('display','block')
				 })
    	</script>
    @endforeach
    </div>
